#ifndef MSQ_H_
#define MSQ_H_

#include <stdio.h>
#include <sys/msg.h>
#include <sys/ipc.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>

#define MSQ_BUF_LEN 1024

struct msq_t
{
    long mtype;
    char data[MSQ_BUF_LEN];
};

int msq_creat(key_t key, int size);
int msq_rm(int msqid);
int msq_put(int msqid, const struct msq_t msq);
int msq_get(int mqid, struct msq_t *msq);
int msq_clear(int msqid, const char *file);

#endif
